-- GENERATED SPELL FOR [Gordunni Warlock] --


function spell0_5240(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20298,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5240', 3000, 1)
end

function spell1_5240(pUnit, Event) --@Shrink,n/a--
pUnit:FullCastSpellOnTarget(7289,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5240', 3000, 1)
end

function Sorts_5240(pUnit, Event)
local choix_sorts_5240 = math.random(0, 1)
if choix_sorts_5240 == 0 then
pUnit:RegisterEvent('spell0_5240', 1, 1)
end
if choix_sorts_5240 == 1 then
pUnit:RegisterEvent('spell1_5240', 1, 1)
end
end

function mob5240_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5240', math.random(1500, 3000), 1)
end

function mob5240_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5240_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5240_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5240, 1, 'mob5240_Action')
RegisterUnitEvent(5240, 2, 'mob5240_Leave')
RegisterUnitEvent(5240, 3, 'mob5240_Kill')
RegisterUnitEvent(5240, 4, 'mob5240_Die')
